package com.csdj.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csdj.entity.Foodlist;
import com.csdj.mapper.FoodlistMapper;
import com.csdj.service.IFoodlistService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zq
 * @since 2024-12-11
 */
@Service
public class FoodlistServiceImpl extends ServiceImpl<FoodlistMapper, Foodlist> implements IFoodlistService{

    @Resource
    private FoodlistMapper foodlistMapper;

    @Override
    public List<Foodlist> selectfoodlistBytop10() {
        return foodlistMapper.selectfoodlistBytop10();
    }

    @Override
    public Foodlist selectfoodlistByName(String name) {
        return foodlistMapper.selectfoodlistByName(name);
    }

    @Override
    public Page<Foodlist> selectfoodlistByCategory(Page<Foodlist> page, String categorytype) {
        return baseMapper.selectfoodlistByCategory(page, categorytype);
    }

    @Override
    public Page<Foodlist> selectfoodlistDesc(Page<Foodlist> page) {
        return baseMapper.selectfoodlistDesc(page);
    }

    @Override
    public Page<Foodlist> selectfoodlistAsc(Page<Foodlist> page) {
        return baseMapper.selectfoodlistAsc(page);
    }

    @Override
    public int selectCount() {
        int i = foodlistMapper.selectCount();
        return i;
    }



}
